1. Field of the Invention
The invention pertains to the field of computer networking. In particular, the invention pertains to a method of reporting various events in a computer networking environment.
2. Description of Related Art
Currently devices, such as Personal Computers or PCs, can be connected over a network, such as an Ethernet network. To connect a PC to an Ethernet network, a network card, having an Ethernet controller with interfaces to the Internet and the PC, is required.
The Simple Network Management Protocol (SNMP) is a protocol used for managing a network and for monitoring networked devices and their corresponding functions and status. SNMP is well-known to those of ordinary skill in the art and is defined in xe2x80x9cRequest for Comments: 1157xe2x80x9d, by Network Working Group, J. Case, M. Fedor, M. Schoffstall and J. Davin, May 1990.
SNMP messages are sent in packets called Protocol Data Units (PDUs). There are five PDU types: get-request; get-next request; get-response; set-request; and trap.
The SNMP Trap PDU is for reporting the occurrence of particular events. The SNMP trap PDU types are:
1. coldstart: indicating that the sending protocol entity is reinitializing itself, such that the configuration or protocol entity may be altered;
2. warmstart: indicating that the sending protocol entity is reinitializing itself, such that neither the configuration nor protocol entity is altered;
3. linkdown: indicating that the sending protocol entity recognizes a failure in one of the communication links;
4. linkup: indicating that the sending protocol entity recognizes that one of the communication links has come up;
5. authenticationFailure: indicating that the sending protocol entity is the addressee of a protocol message that is not properly authenticated;
6. egpNeighborLoss: indicating that an EGP neighbor for whom the sending protocol entity was an EGP peer has been marked down and the peer relationship no longer exists; and
7. enterpriseSpecific: indicating that the sending protocol entity recognizes that an enterprise-specific event occurred.
FIG. 1 shows a generic SNMP packet 2. The SNMP packet 2 is typically enveloped in a User Datagram Protocol (UDP) packet 4. UDP is well-known to those of ordinary skill in the art and is described in xe2x80x9cRequest for Comments: 768xe2x80x9d, J. Postel, August 1980. UDP provides for the transmission of datagrams within an environment of an interconnected set of computer networks. UDP is transaction oriented and does not provide guaranteed delivery or duplicate protection.
Each UDP packet is enveloped in an Internet Protocol (IP) packet 6. IP is a datagram-oriented protocol which treats each packet independently. IP neither guarantees that packets reach their destination nor takes corrective action if they do not. IP is described in, xe2x80x9cInternet Protocol DARPA Internet Protocol Specificationxe2x80x9d, Request for Comments: 791xe2x80x3, prepared for Defense Advanced Research Projects Agency by Information Sciences Institute, September 1981.
Each IP packet is enveloped in a Medium Access Control (MAC) layer packet 8. The MAC layer is well-known to those of ordinary skill in the art and specifies the rules of accessing a shared medium, such as the Ethernet. The MAC layer is described in the IEEE 802.3 standard specification, IEEE CSMA/CD Std 802.3, 1998 Edition 31. MAC Control 31.1, Institute of Electrical and Electronic Engineers.
When the PC detects an event which requires the generation of an SNMP packet, software on the PC constructs the SNMP packet. As shown above and in FIG. 1, the software must construct each of the SNMP trap PDU in an SNMP packet, the UDP packet, the IP packet and the MAC layer packet. That is, the PC must execute a separate network layer software stack to build each protocol layer of the message for transmission over the network.
Some of the disadvantages of this method of building and sending SNMP trap PDUs are:
1. the PC must execute full network layer software stacks for each protocol layer in order to build a message containing the SNMP trap PDU and all other required protocol layer packets necessary for sending the SNMP trap PDU over the network; and
2. when the PC is experiencing low power or the operating system is hung, the PC will be unable to execute the software which is necessary to build and send a message containing the SNMP trap PDU.
In an embodiment of the invention, data, including static fields, for a packet template is received. The packet template is stored into a memory. An indication of an event to be reported is received and a packet, which includes non-static information and is based on the stored packet template and the indication, is generated. The generated packet is sent to a communication controller for transmission over a shared medium.
More particularly, when an SNMP trap PDU is generated, most of the fields of the SNMP trap PDU, the UDP datagram packet, the IP datagram packet and the MAC layer packet remain fixed or static when a particular trap type/event indication strategy is employed. An embodiment makes use of this fact by utilizing a packet template having values preset into each of the static fields.
An embodiment of the invention includes a device, such as an Application Specific Integrated Circuit (ASIC) which has memory, such as a RAM and access to a non-volatile RAM (NVRAM) or Electrically Erasable Programmable Read Only Memory (E2PROM). The ASIC may reside in a PC or on a network interface card for providing an interface between the PC and a network, such as the Ethernet.
Software on the PC constructs a base packet or template for an SNMP trap PDU and stores the template into the NVRAM or E2PROM. When the ASIC determines the need to generate and send the SNMP trap PDU, the ASIC can, without a CPU and without a full implementation of the network layer software stacks, generate the SNMP trap PDU based on the packet template stored in the NVRAM of the ASIC. The ASIC need only insert the non-static data into a packet built from the packet template before sending the packet to a communication controller for transmission over the network.
Thus, SNMP trap packets may be generated and sent under low power conditions or when the PC operating system is hung.